var express = require('express');
var router = express.Router();
var Mock = require('mockjs');

/* GET home page. */
router.get('/', function(req, res, next) {
  let data={};
  let userData=Mock.mock({
    "peo|4":[{
      "name":"@cname",
      "id|1000000-2000000":1,
    }]
  })
  let name=[];
  let id=[];
  for(let i=0;i<4;i++){
    name[i]=userData.peo[i].name;
    id[i]=userData.peo[i].id;
}
  data["name"]=name;
  data["id"]=id;
  res.json(data);
});

module.exports = router;
